package github.ziwukun.jsonql.orm;

import github.ziwukun.jsonql.lang.CmpOpr;

class RltPropImpl implements RltProp{
	private static final long serialVersionUID = 8774982732000192914L;
	String propName;
	boolean single;
	ModelImpl ofModel;
	
	ContainerImpl rltCtn;
	CtnFieldImpl foreignField;
	CtnFieldImpl primaryField;
	ModelImpl propModel;
	
	RltPropImpl(RltPropBuilder builder,ModelImpl ofModel){
		RltPropBuilder.instanceRltProp(builder, this,ofModel);
	}
	
	@Override
	public String propName() {
		return propName;
	}

	@Override
	public boolean single() {
		return single;
	}

	@Override
	public boolean support(CmpOpr symbol) {
		return false;
	}

	@Override
	public boolean sortable() {
		return false;
	}

	@Override
	public Model ofModel() {
		return ofModel;
	}

	@Override
	public Container rltCtn() {
		return rltCtn;
	}

	@Override
	public CtnField foreignField() {
		return foreignField;
	}

	@Override
	public CtnField primaryField() {
		return primaryField;
	}

	@Override
	public Model propModel() {
		return propModel;
	}
}
